package com.mmall.controller;

import com.mmall.service.IProductService;
import entity.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pojo.Cart;
import pojo.Product;
import vo.CartVo;

import javax.servlet.http.HttpSession;
import java.util.List;

@RestController
@RequestMapping("/product")
public class ProductController {
    @Autowired
    private IProductService productService;

    @GetMapping("/selectByPrimaryKey/{id}")
    public Product selectByPrimaryKey(@PathVariable("id") Integer id) {
        return productService.selectByPrimaryKey(id);
    }
}
